set program_name=my-golang-app.exe

echo "cleaning ..."
rmdir /s/q .\dist
go clean

echo "generating docs ..."
swag init

echo "building ..."
mkdir dist
go build -o .\dist\%program_name%
xcopy /E .\conf .\dist\conf\

echo "packaging ..."
del %program_name%.7z
"C:\Program Files\7-Zip\7z.exe" a %program_name%.7z dist